function [wOOC] = Function_DMRS_w_OOC(Mode, n_ID)
	% w_OOC Generate the orthogonal codes for PUSCH DMRS
  	% Outputs:     wOOC                     - 1 x NLayers*2 x 20 vector, where
   	%                                         each pair of elements corresponds to the orth. code of layer 0,1,2,3,
 	%                                         resepecively
 	%                                         each row corresponds to layers 0,1,2,3, respectively
	% Spec:        3GPP TS 36.211 section 5.5.2.1.1 v13.0.0
    
    switch Mode
        case 'psbch_D2D'
            if mod(n_ID,2)==0
            	wOOC = [1, 1];
            else
             	wOOC = [1, -1];
            end
        case 'psbch_V2X'
            % In the standard this is defined as [+1 +1 +1] or [+1 -1 +1], but in our code this is handled within DMRS_seq generation
        	if mod(n_ID,2)==0
                wOOC = [1, 1];
            else
             	wOOC = [1, -1];
         	end
        case 'psdch'
            wOOC = [1, 1];
        case 'pssch_D2D'
            if mod(n_ID,2)==0
            	wOOC = [1, 1];
            else
              	wOOC = [1, -1];
         	end
        case 'pssch_V2X'
            if mod(n_ID,2)==0
              	wOOC = [1, 1];
            else
              	wOOC = [1, -1];
            end
        case 'pscch_V2X'
            wOOC = [1, 1];
        case 'pscch_D2D'
            wOOC = [1, 1];
        case 'pusch'
%             if strcmp(h.OrthoCover,'Off')     % Updata later
%                 wOOC = ones(1, 2 * NLayers);              
%             else
%                 wOOC = w_mtx(DynCyclicShift+1,1:2*NLayers);       % Updata later
%         	end
    end
end